/*
 * WTF Deferred Shading Buffer Pre-processor: Vertex Shader
 */

varying vec3 normal;
varying float depth;
varying vec3 specular;
varying float shininess;

void main() {
	gl_Position = ftransform();
	// convert normal to eyespace
	normal = normalize(gl_ModelViewProjectionMatrix * vec4(gl_Normal, 0)).xyz;
    // determine depth (linear)
	depth = (gl_ModelViewProjectionMatrix * gl_Vertex).z;
    // save colour
	gl_FrontColor = gl_FrontMaterial.diffuse;
    // save specular properties
    specular = gl_FrontMaterial.specular.rgb;
    shininess = gl_FrontMaterial.shininess;
}
